Upload Aid&Migration Dataset 


//Descriptive statistics (Table 7 in the Appendix):
sum tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 logOECDterrordeaths logOECDGDP OECDUnemployment1


//Correlation Matrix (Table 8 in the Appendix):
estpost correlate  RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 logOECDterrordeaths logOECDGDP OECDUnemployment1, matrix listwise
esttab, unstack not noobs compress
est store c1 
esttab * using test_correlation.rtf, unstack not noobs compress


//Regression Models:

** Country & YR FE (Table 2)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1   i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, replace ctitle(Model 1)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1  i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 2)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 pop1 polity1 intensity1  i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 3)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 4)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1  intensity1 urbanization1 FDI1 OilRents1 Trade1 i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 5)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 logOECDterrordeaths logOECDGDP OECDUnemployment1 i.Year, fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 6)

** Country FE Only (Table 10 in Appendix)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1    , fe robust cluster(country1)
outreg2 using myreg.doc, replace ctitle(Model 21)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1   , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 22)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 pop1 polity1 intensity1   , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 23)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1  , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 24)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 urbanization1 intensity1 FDI1 OilRents1 Trade1  , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 25)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 urbanization1 intensity1 FDI1 OilRents1 Trade1 logOECDterrordeaths logOECDGDP OECDUnemployment1, fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 26)

*No FE (Table 11 in Appendix)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1    , re robust cluster(country1)
outreg2 using myreg.doc, replace ctitle(Model 27)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1   , re robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 28)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 pop1 polity1 intensity1  , re robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 29)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 , re robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 30)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 , re robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 31)
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 logOECDterrordeaths logOECDGDP OECDUnemployment1, re robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 32)

*No FE, Lagged DV (Table 12 in Appendix):

gen tot_rate1 = tot_rate[_n-1]
xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 tot_rate1 logOECDterrordeaths logOECDGDP OECDUnemployment1 , re robust cluster(country1)
outreg2 using myreg.doc, replace ctitle(Model 33)


**Instrumental variable analysis with second moment of rural development aid (Table 13 in Appendix):
egen meanRuralAid = mean(RuralAidGDP1), by(country1)
gen InstrumentRuralAid2 = (RuralAidGDP1 - meanRuralAid)^2
gen InstrumentRuralAid3 = (RuralAidGDP1 - meanRuralAid)^3
xtivreg  tot_rate  UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 logOECDterrordeaths logOECDGDP OECDUnemployment1 i.Year (RuralAidGDP1 = InstrumentRuralAid2), fe vce(robust)
outreg2 using myreg.doc, replace ctitle(Model 34)
xtivreg  tot_rate  UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 logOECDterrordeaths logOECDGDP OECDUnemployment1 i.Year  (RuralAidGDP1 = InstrumentRuralAid3), fe vce(robust)
outreg2 using myreg.doc, append ctitle(Model 35)




** Models with OECD variables weighted by distance (Table 9 in Appendix):

gen OECDTerrordeathsXdistance = logOECDterrordeaths*ave_distance
gen OECDGDPxDistance = logOECDGDP*ave_distance
gen OECDUnempXdistance = OECDUnemployment1*ave_distance

xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 OECDTerrordeathsXdistance OECDGDPxDistance OECDUnempXdistance i.Year, fe robust cluster(country1)
outreg2 using myreg.doc, replace ctitle(Model 15)

xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 OECDTerrordeathsXdistance OECDGDPxDistance OECDUnempXdistance , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 16)

xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 OECDTerrordeathsXdistance OECDGDPxDistance OECDUnempXdistance , re robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 17)

gen OECDTerrordeathsXdistanceA = logOECDterrordeaths*dist_oecd35
gen OECDGDPxDistanceA = logOECDGDP*dist_oecd35
gen OECDUnempXdistanceA = OECDUnemployment1*dist_oecd35

xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 OECDTerrordeathsXdistanceA OECDGDPxDistanceA OECDUnempXdistanceA i.Year, fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 18)

xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 OECDTerrordeathsXdistanceA OECDGDPxDistanceA OECDUnempXdistanceA , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 19)

xtreg tot_rate RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 OECDTerrordeathsXdistanceA OECDGDPxDistanceA OECDUnempXdistanceA , re robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 20)




** Using urbanization as DV w/ same time series (Table 3)):
xtreg rc_wdi_urban RuralAidGDP1 UrbanAidGDP1   i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, replace ctitle(Model 7)
xtreg rc_wdi_urban RuralAidGDP1 UrbanAidGDP1 AllOtherAid1  i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 8)
xtreg rc_wdi_urban RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 pop1 polity1 intensity1  i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 9)
xtreg rc_wdi_urban RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 pop1 polity1 intensity1  FDI1 OilRents1  i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 10)
xtreg rc_wdi_urban RuralAidGDP1 UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1  intensity1  FDI1 OilRents1 Trade1 i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 11)
xtreg rc_wdi_urban RuralAidGDP1  AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1  FDI1 OilRents1 Trade1 i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 12)
xtreg rc_wdi_urban  UrbanAidGDP1 AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1  FDI1 OilRents1 Trade1 i.Year , fe robust cluster(country1)
outreg2 using myreg.doc, append ctitle(Model 13)




** Propensity score matching effort:


rename RuralAidGDP1 treatment

gen logtreat = ln(treatment)

sum logtreat, detail

qui generate cut = -11 if logtreat <=-10.47146
qui replace cut = -10 if logtreat > -10.47146

rename UrbanAidGDP1 alttreatment

gpscore alttreatment   AllOtherAid1 gdp1 gdpSquared1 pop1 polity1 intensity1 urbanization1 FDI1 OilRents1 Trade1 logOECDterrordeaths logOECDGDP OECDUnemployment1, t(logtreat) gpscore(gpvar) predict(hat_treat) sigma(sd) cutpoints(cut) index(p50) nq_gps(8)  detail

